<template>
  <div class="addr-wrap">
    <HeadBar
      title="我的地址"
      :isShowLeftIcon="true"
      @isShowComponent="showHandler"
    ></HeadBar>

    <!-- 占位 -->
    <div style="height: 50px"></div>

    <van-swipe-cell>
      <van-card desc="描述信息" title="商品标题" class="goods-card">
        <span slot="thumb">姓名</span>
      </van-card>

      <!-- <van-cell :border="true" title="单元格" value="内容" /> -->
      <template #right>
        <van-button square type="danger" text="删除" @click="delDrr" />
        <van-button square type="primary" text="修改" @click="modDrr" />
      </template>
    </van-swipe-cell>



    <div class="adddrr" @click="JumpAdd">添加地址</div>

    <deitDrr class="deitDrr" v-if="isShowEditPage" @SendOff="isShowEditPage=$event"></deitDrr>
  </div>
</template>

<script>
import HeadBar from "@/components/HeadBar";
import deitDrr from '@/views/my/components/addr/deitDrr'
export default {
  name: "addr",
  data() {
    return {
        isShowEditPage:false
    };
  },
  components: {
    HeadBar,
    deitDrr
  },
  methods: {
    showHandler($event) {
      this.isShowAddr = $event;
      this.$emit("SendOff", $event);
    },
    delDrr() {
      console.log(1);
    },
    modDrr() {
      console.log(2);
    },
    JumpAdd(){
        this.isShowEditPage = true;
    }
  },
};
</script>

<style scoped lang="scss">
.addr-wrap {
  width: 100vw;
  min-height: 100vh;
  background-color: #fff;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 200;
}
::v-deep .van-card__content,
::v-deep .van-card__thumb {
  min-height: unset;
  height: unset;
}


.adddrr {
  width: 100%;
  height: 80px;
  position: fixed;
  bottom: 0;
  left: 0;
  background-color: #c00000;
  color: #fff;
  font-size: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.deitDrr{
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #fff;
    z-index: 100;
}
</style>
